<!-- 公共的底部-标签栏 -->
<template>
  <div class="tabbar">
    <ul>
      <router-link to="/home" tag="li">
        <div class="tab-icon">
          <i class="iconfont icon-shouye2" v-if="$route.path.includes('/home')"></i>
          <i class="iconfont icon-1" v-else></i>
        </div>
        <span>首页</span>
      </router-link>

      <router-link to="/collect" tag="li">
        <div class="tab-icon">
          <i
            class="iconfont icon-leimupinleifenleileibie2"
            v-if="$route.path.includes('/collect')"
          ></i>
          <i class="iconfont icon-leimupinleifenleileibie" v-else></i>
        </div>
        <span>收藏</span>

      </router-link>
      <router-link to="/mine" tag="li">
        <div class="tab-icon">
          <i class="iconfont icon-faxian1" v-if="$route.path.includes('/mine')"></i>
          <i class="iconfont icon-faxian" v-else></i>
        </div>
        <span>我的</span>
      </router-link>
    </ul>
  </div>
</template>

<script>
//这里可以导入其他文件（比如：组件，工具js，第三方插件js，json文件，图片文件等等）
//例如：import 《组件名称》 from '《组件路径》';

export default {
  //import引入的组件需要注入到对象中才能使用
  components: {},
  data() {
    //这里存放数据
    return {};
  },
  mounted() {
    // console.log(this);
  }
};
</script>
<style lang="less">
.router-link-active {
  color: #f55;
}
.tabbar {
  width: 100%;
  height: 4.9rem;
  border-top: 1px solid #ccc;
  position: fixed;
  bottom: 0;
  left: 0;
  background: #fff;
  z-index: 999;
  ul {
    display: flex;
    height: 4.9rem;
    justify-content: center;
    align-items: center;
    li {
      flex: 1;
      text-align: center;
      i {
        font-size: 2.2rem;
      }
    }
  }
}
</style>